package com.common.supply.service.impl.extdata;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.common.supply.domain.entity.extdata.CustomerCrsReport;
import com.common.supply.mapper.extdata.CustomerCrsReportMapper;
import com.common.supply.service.ICustomerCrsReportService;
import org.springframework.stereotype.Service;


/**
 * 用户CRS征信Service业务层处理
 *
 * @author african-loan
 * @date 2021-12-30
 */
@Service
public class CustomerCrsReportServiceImpl extends ServiceImpl<CustomerCrsReportMapper, CustomerCrsReport> implements ICustomerCrsReportService {


    @Override
    public CustomerCrsReport getLocalCreditReport(String bvn) {
        QueryWrapper<CustomerCrsReport> eq = new QueryWrapper<CustomerCrsReport>().eq("bvn", bvn).eq("status", "1");
        eq.last("order by id desc limit 1");
        return getOne(eq);
    }
}
